{% extends "base.html" %}
{% load i18n %}

{% block title %} Dashboard - Mr. Edu {%endblock%}

{% block section%}

		<h1>{%trans "[TITLE] What you want to do?"%}</h1>
		
		<ul id="actionsTeacher">
			<li><a href="/mrEdu/{{userRole}}/content/upload" id="action-upload">{%trans "[DASHBOARD] Upload my contents"%}</a></li>
			<li><a href="/mrEdu/{{userRole}}/collections" id="action-collections">{%trans "[DASHBOARD] Look at my folders"%}</a></li>
			<li><a href="/mrEdu/{{userRole}}/classes" id="action-classes">{%trans "[DASHBOARD] Manage classes"%}</a></li>
		</ul>
		
		<h2>{%trans "[TITLE] Students updates"%}</h2>
		{% if content %}
		<div id="lastUpdates">
			<ul>
				{% for item in content%}
				<li>
					<span class="date">{{item.creation_date|date:"d M Y"}}</span>
					<span class="news">{{item.user.first_name}} {{item.user.last_name}} uploads &quot;{{item.name}}&quot;</span> <!-- <a href="show_item/{{item.id}}">{{item.name}}</a> -->
				</li>
				{% endfor %}
			</ul>
		</div>
		{% else %}
		<p>{% trans "[MESSAGE] No updates to show." %}</p>
		{% endif %}
{%endblock%}

{% block script%}
		{% if content %}
		<script type="text/javascript" charset="UTF-8" src="/static/js/jquery.vticker.1.4.js"></script>
		<script type="text/javascript">
			$('#lastUpdates').vTicker({
				speed: 700,
				pause: 3000,
				showItems: 2,
				animation: 'fade',
				mousePause: false,
				height: 0,
				direction: 'up'
				});
		</script>
		{% endif %}
{%endblock%}